<template>
  <div class="filter">
    <el-form
      :inline="true"
      :model="formInline"
      ref="formInline"
      class="demo-form-inline"
      size="mini"
    >
      <el-form-item>
        <el-button type="primary" @click="onSearch">查询</el-button>
        <el-button type="info" @click="onRest">重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  props: {
  },
  data() {
    return {
      cityList: [],
      formInline: {
        idorname: "", //体检项名或者ID查询
        privice: "", //省
        city: "", //市
        hospital_id: "" //机构ID
      }
    };
  },
  methods: {
    getCityList(val) {
      axios.get("/api/area", { params: { parent_id: val } }).then(res => {
        const { code, data } = res.data;
        if (code == "00000") {
          this.cityList = data;
        }
      });
    },
    // 子传父
    onSearch() {
      this.$emit("emtFormLine", this.formInline);
    },
    onRest() {
      // resetFields
      this.formInline.city = "";
      this.$refs.formInline.resetFields();
    }
  }
};
</script>

<style lang="less" scoped>
</style>